action->handler = handler;
action->name = devname;
action->dev_id = dev_id;
+ action->free_on_release = 1;
retval = setup_irq(irq, action);
if (retval)
/* Wait to make sure it's not being used on another CPU */
do { smp_mb(); } while ( desc->status & IRQ_INPROGRESS );
- if (action)
+ if (action && action->free_on_release)
xfree(action);
}
#include <asm/regs.h>
#include <asm/hardirq.h>
-struct irqaction
-{
+struct irqaction {
void (*handler)(int, void *, struct cpu_user_regs *);
const char *name;
void *dev_id;
+ bool_t free_on_release;
};
/*
* This is the "IRQ descriptor", which contains various information
* about the irq, including what kind of hardware handling it has,
* whether it is disabled etc etc.
- *
- * Pad this out to 32 bytes for cache and indexing reasons.
*/
-typedef struct irq_desc{
+typedef struct irq_desc {
unsigned int status; /* IRQ status */
hw_irq_controller *handler;
struct msi_desc *msi_desc;